package com.hry.sunflower.service.impl;

import com.hry.sunflower.dao.UserMapper;
import com.hry.sunflower.pojo.User;
import com.hry.sunflower.service.UserService;
import com.hry.sunflower.util.MD5Util;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserMapper userMapper;

    /**
     * 查询用户基本信息
     * @param user
     * @return
     */
    @Override
    public User getUserInfo(User user, Integer status) {
        System.out.println(user);
        return userMapper.getUserInfo(user.getEmail(), MD5Util.MD5EncodeUtf8(user.getPassword()), status);
    }
}
